﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using DAO;
using DTO;
namespace BUS
{
    public class HangHoaBUS
    {
        public bool KTMaHang(string MaHang)
        {
            HangHoaDAO hh = new HangHoaDAO();
            return hh.KTMaHang(MaHang);
        }
        public bool ThemHangHoa(HangHoaDTO hhDto)
        {
            HangHoaDAO hh = new HangHoaDAO();            
            return hh.ThemHangHoa(hhDto);            
        }
        public List<HangHoaDTO> LayHangHoa()
        {            
            HangHoaDAO hh = new HangHoaDAO();
            return hh.LayHangHoa();
        }
        public HangHoaDTO LayHangTheoMa(string MaHang)
        {
            HangHoaDAO hh = new HangHoaDAO();
            return hh.LayHangTheoMa(MaHang);
        }
        public bool XoaHangHoa(string MaHang)
        {
            HangHoaDAO hh = new HangHoaDAO();
            return hh.XoaHangHoa(MaHang);
        }
        public bool SuaHangHoa(HangHoaDTO hh)
        {
            HangHoaDAO hhBus = new HangHoaDAO();
            return hhBus.SuaHangHoa(hh);
        }
    }
}
